package com.css.zfzx.sjcj.modules.pchjdzb.repository;

import com.css.zfzx.sjcj.modules.pchjdzb.repository.entity.PcHjDzbEntity;
import io.lettuce.core.dynamic.annotation.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Description: zfzx-wxqh
 * @Author: lhl
 * @CreateDate: 2022/4/24 17:21
 */
@Repository
public interface PcHjDzbRepository extends JpaRepository<PcHjDzbEntity,String> {
    @Modifying
    @Transactional
    @Query(nativeQuery = true,value = "insert into pc_hj_dzb('uuid','province','city','area','create_time','data_type','extends1','extends2') value (:#{#entity.uuid},:#{#entity.province},:#{#entity.city},:#{#entity.area},:#{#entity.createTime},:#{#entity.dataType},:#{#entity.extends1},:#{#entity.extends2})")
    int save1(PcHjDzbEntity entity);
}
